﻿using BCEntity.TMS.Agent.AgentNightFreightConfiguration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCData.TMS.Agent.AgentNightFreightConfiguration
{
    /// <summary>
    /// 代理商夜间运费配置
    /// </summary>
    public interface IAgentNightFreightConfigurationData
    {
        /// <summary>
        /// 添加代理商夜间运费配置
        /// </summary>
        /// <param name="entity">代理商夜间运费配置信息</param>
        /// <returns></returns>
        Task<AgentNightFreightConfigurationEntity> Insert(AgentNightFreightConfigurationEntity entity);

        /// <summary>
        /// 获取代理商夜间运费配置
        /// </summary>
        /// <param name="agentRecordId">代理商ID</param>
        /// <param name="orderExtractProportion">订单抽取比例(百分比)</param>
        /// <param name="startHour">开始小时</param>
        /// <param name="startMinute">开始分钟</param>
        /// <param name="endHour">结束小时</param>
        /// <param name="endMinute">结束分钟</param>
        /// <param name="pageIndex">页号</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        Task<(IEnumerable<AgentNightFreightConfigurationEntity>, int)> Query(long agentRecordId, int? orderExtractProportion, int? startHour, int? startMinute, int? endHour, int? endMinute, int pageIndex, int pageSize);

        /// <summary>
        /// 获取代理商夜间运费配置
        /// </summary>
        /// <param name="agentNightFreightConfigurationId">代理商夜间运费配置ID</param>
        /// <returns></returns>
        Task<AgentNightFreightConfigurationEntity> GetEntity(long agentNightFreightConfigurationId);

        /// <summary>
        /// 修改代理商夜间运费配置
        /// </summary>
        /// <param name="entity">代理商夜间运费配置信息</param>
        /// <returns></returns>
        Task<AgentNightFreightConfigurationEntity> Update(AgentNightFreightConfigurationEntity entity);

        /// <summary>
        /// 删除代理商夜间运费配置
        /// </summary>
        /// <param name="agentNightFreightConfigurationId">代理商夜间运费配置ID</param>
        /// <returns></returns>
        Task<int> Delete(long agentNightFreightConfigurationId);

        /// <summary>
        /// 获取代理商夜间运费配置
        /// </summary>
        /// <param name="agentRecordId">代理商ID</param>
        /// <param name="nightFreightConfigurationId">夜间运费配置ID</param>
        /// <returns></returns>
        Task<AgentNightFreightConfigurationEntity> GetById(long agentRecordId, long nightFreightConfigurationId);

        /// <summary>
        /// 获取代理商夜间运费配置
        /// </summary>
        /// <param name="agentRecordId">代理商ID</param>
        /// <param name="orderExtractProportion">订单抽取比例(百分比)</param>
        /// <param name="startHour">开始小时</param>
        /// <param name="startMinute">开始分钟</param>
        /// <param name="endHour">结束小时</param>
        /// <param name="endMinute">结束分钟</param>
        /// <returns></returns>
        Task<IEnumerable<AgentNightFreightConfigurationEntity>> GetList(long agentRecordId, int? orderExtractProportion, int? startHour, int? startMinute, int? endHour, int? endMinute);
    }
}
